﻿using System;
using System.Configuration;
using ServiceStack;
using ServiceStack.Redis;
using ServiceStack.Redis.Generic;
using System.Security;
using System.Collections.Generic;
using ServiceStack.FluentValidation.Results;
using GameTools;
using PuSuoPai;

namespace TeZhanDui
{
	public class TeZhanDuiService : Service
	{
        //================================= Room =================================
        public RoomMessageResp Post(RoomMessageReq req)
        {
            if (!RoomControl.Instance.IsRoomExist(req.roomId))
            {
                Console.WriteLine("add room" + req.roomId);
                RoomControl.Instance.AddRoom(req);
            }
            return RoomControl.Instance.RoomControlFsm(req);
        }
        //================================= Game =================================
        public GameMessageResp Post(GameMessageReq req)
        {
            return RoomControl.Instance.GameControlFsm(req);
        }
        
	}
}

